<template>
  <view>
    <view class="boxT">
      <text class="title">{{ pageIndex == 1 ? 'C端群聊' : 'B端商城' }}</text>
    </view>
    <my-bar :selected="1"></my-bar>
  </view>
</template>

<script>
export default {
  data() {
    return {
      pageIndex: 1,
    }
  },
  onShow() {
    if (uni.getStorageSync('pageIndex')) {
      this.pageIndex = uni.getStorageSync('pageIndex')
      if (this.pageIndex === 2) {
        // this.list = this.$tarBarList.B
        uni.setStorageSync('pageIndex', 2)
      } else {
        // C端
        this.pageIndex = 1
        uni.setStorageSync('pageIndex', 1)
        // 获取热推商品数组
      }
    } else {
      // C端
      this.pageIndex = 1
      uni.setStorageSync('pageIndex', 1)
      // 获取热推商品数组
    }
  },
}
</script>

<style lang="scss" scoped>
.boxT {
  width: 100%;

  .title {
    display: block;
    width: 100%;
    text-align: center;
  }
}
</style>
